import { h,render } from "vue";

const dialog = {
  install(app) {
    console.log("dialog install");
    app.config.globalProperties.$dialog = this;
  },
  show(options) {
    console.log(options);
    const vnode= h("div", options.message);

    const container = document.createElement("div");
    render(vnode, container);
    document.body.appendChild(container.firstElementChild);
    return vnode;
  },
};
export default dialog;
